#include "stdafx.h"
#include "psycheApp.h"
#include "psycheDlg.h"
#include "MsgAll.h"
#include "Network.h"
#include "EventMgr.h"


void CpsycheDlg::onAddFriend(MsgSn* sn)
{
	MsgUsn usn;
	usn.SetBuf(sn->GetBuf(),sn->GetLen());
	string name;
	usn >> name;
	addFriend(name);

}

void CpsycheDlg::onTalkMsg(MsgSn* sn)
{
	MsgUsn usn;
	usn.SetBuf(sn->GetBuf(),sn->GetLen());
	string	name;
	int		time;
	string	data;
	usn >>	name;
	usn >>	time;
	usn >>	data;
	string	str;
	str = name + "  " + data;
	m_history.InsertItem(m_history.GetItemCount(),str.c_str());

}